package com.chr.service.impl;

import com.chr.entity.Menu;
import com.chr.mapper.MenuMapper;
import com.chr.service.MenuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 菜单Service实现类
 * @author java1234_小锋
 * @site www.java1234.com
 * @company Java知识分享网
 * @create 2020-04-05 11:47
 */
@Service("menuService")
public class MenuServiceImpl implements MenuService {

    @Autowired
    private MenuMapper menuMapper;
    
    @Override
    public List<Menu> list() {
        return menuMapper.list();
    }

    @Override
    public Long getTotal() {
        return menuMapper.getTotal();
    }

    @Override
    public Menu findById(Integer id) {
        return menuMapper.findById(id);
    }

    @Override
    public Integer add(Menu menu) {
        return menuMapper.add(menu);
    }

    @Override
    public Integer update(Menu menu) {
        return menuMapper.update(menu);
    }

    @Override
    public Integer delete(Integer id) {
        return menuMapper.delete(id);
    }
}
